import Vue from 'vue'
import router from './router/index'
import App from './App.vue'
import store from './store'
// 引入全局样式
import '@/assets/css/global.css'
// 引入字体图标
import '@/assets/font/iconfont.css'
// 引入主题
require('/public/static/theme/chalk')
require('/public/static/theme/vintage')
// 导入axios
import axios from 'axios'
// 导入echarts文件
import echarts from '@/echarts/index'
// ws服务器连接
import SocketService from '@/utils/socket_service'
// 对服务端进行websocket的连接
SocketService.Instance.connect()
// 挂载$scoket
Vue.prototype.$scoket = SocketService.Instance
// 配置基础路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api'
// 挂载$http
Vue.prototype.$http = axios
// 挂载$echarts 
Vue.prototype.$echarts = echarts
// elementui引入与使用
import { Loading, Icon, Dialog, Button, Col, Form, FormItem, Select, Input, Option} from 'element-ui';
Vue.use(Icon)
Vue.use(Dialog)
Vue.use(Button)
Vue.use(Loading)
Vue.use(Col)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Select)
Vue.use(Input)
Vue.use(Option)

Vue.config.productionTip = false
new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
